﻿@inject ILessonService LessonService
@inject IMainPlanService MainPlanService
<Card IsShadow="true">
    <BodyTemplate>
        @* <hr size="1" style="border-top:2px green solid;"> *@
        @if (_mainPlanDto.Status != MainPlanStatus_e.结束)
        {
            <CompUpdateIcon Roles="" Url="@($"lesson/update/{LessonDto.Id}")" />
        }
        <span style="color: dodgerblue">经验内容：</span>
        <CompMultiLineText Text="@LessonDto.Content" />

        <span style="color: dodgerblue">经验图片：</span>
        <br />
        <CompMultiImgs ContentUrl="@LessonDto.ContentUrl" />
    </BodyTemplate>
</Card>
@code {
    [Parameter]
    public LessonDto? LessonDto { get; set; }
    private MainPlanDto _mainPlanDto = new();

    protected override async Task OnInitializedAsync()
    {
        var mResult = await MainPlanService.GetFirstOrDefaultAsync(LessonDto.MainPlanId);
        if (mResult.Status) _mainPlanDto = mResult.Result;
    }
}
